//PersonImpl实现类
import {IPerson} from './IPerson'; //导入IPerson模块
export class PersonImpl implements IPerson{
    age:number;
    name:string;
    //构造函数对变量初始化
    constructor(age:number,name:string){
      this.age = age;
      this.name = name;
    }
  
    //实现接口的getInfo方法
    getInfo():string{
      return `print info name = ${this.name},age = ${this.age}`;
    }
}